//处理vuex
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
  state:{
    //商品列表
    goodList:[],
    //地址信息
    addressInfo:{}
  },
  mutations:{
    //生成商品列表
    genGoodList(state,payload){
      state.goodList = []
      state.goodList.unshift(...payload)
    },
    //生成地址信息
    genAddressInfo(state,payload){
      state.addressInfo = payload
    }
  },
  actions:{},
  getters:{}
});
export default store